package org.paces.Stata.StringUtils.Similarity;

import java.util.*;

/**
 * Class used to construct Locale objects using arguments that may be more
 * familiar to Stata users.
 * @author Billy Buchanan
 * @version 0.0.0
 */
public class Locality {

	private static final Map<String, String> langmap = new HashMap<>();
	private static final Map<String, Locale> langConstants = new HashMap<>();

	public Locality(String loc) {
		langmap.put("Afar", "aa");
		langmap.put("Abkhazian", "ab");
		langmap.put("Achinese", "ace");
		langmap.put("Acoli", "ach");
		langmap.put("Adangme", "ada");
		langmap.put("Adyghe", "ady");
		langmap.put("Adygei", "ady");
		langmap.put("Avestan", "ae");
		langmap.put("Afrikaans", "af");
		langmap.put("Afro-Asiatic languages", "afa");
		langmap.put("Afrihili", "afh");
		langmap.put("Ainu", "ain");
		langmap.put("Akan", "ak");
		langmap.put("Akkadian", "akk");
		langmap.put("Aleut", "ale");
		langmap.put("Algonquian languages", "alg");
		langmap.put("Southern Altai", "alt");
		langmap.put("Amharic", "am");
		langmap.put("Aragonese", "an");
		langmap.put("English, Old (ca.450-1100)", "ang");
		langmap.put("Angika", "anp");
		langmap.put("Apache languages", "apa");
		langmap.put("Arabic", "ar");
		langmap.put("Official Aramaic (700-300 BCE)", "arc");
		langmap.put("Imperial Aramaic (700-300 BCE)", "arc");
		langmap.put("Mapudungun", "arn");
		langmap.put("Mapuche", "arn");
		langmap.put("Arapaho", "arp");
		langmap.put("Artificial languages", "art");
		langmap.put("Arawak", "arw");
		langmap.put("Assamese", "as");
		langmap.put("Asturian", "ast");
		langmap.put("Bable", "ast");
		langmap.put("Leonese", "ast");
		langmap.put("Asturleonese", "ast");
		langmap.put("Athapascan languages", "ath");
		langmap.put("Australian languages", "aus");
		langmap.put("Avaric", "av");
		langmap.put("Awadhi", "awa");
		langmap.put("Aymara", "ay");
		langmap.put("Azerbaijani", "az");
		langmap.put("Bashkir", "ba");
		langmap.put("Banda languages", "bad");
		langmap.put("Bamileke languages", "bai");
		langmap.put("Baluchi", "bal");
		langmap.put("Balinese", "ban");
		langmap.put("Basa", "bas");
		langmap.put("Baltic languages", "bat");
		langmap.put("Belarusian", "be");
		langmap.put("Beja", "bej");
		langmap.put("Bedawiyet", "bej");
		langmap.put("Bemba", "bem");
		langmap.put("Berber languages", "ber");
		langmap.put("Bulgarian", "bg");
		langmap.put("Bihari languages", "bh");
		langmap.put("Bhojpuri", "bho");
		langmap.put("Bislama", "bi");
		langmap.put("Bikol", "bik");
		langmap.put("Bini", "bin");
		langmap.put("Edo", "bin");
		langmap.put("Siksika", "bla");
		langmap.put("Bambara", "bm");
		langmap.put("Bengali", "bn");
		langmap.put("Bantu languages", "bnt");
		langmap.put("Tibetan", "bo");
		langmap.put("Breton", "br");
		langmap.put("Braj", "bra");
		langmap.put("Bosnian", "bs");
		langmap.put("Batak languages", "btk");
		langmap.put("Buriat", "bua");
		langmap.put("Buginese", "bug");
		langmap.put("Blin", "byn");
		langmap.put("Bilin", "byn");
		langmap.put("Catalan", "ca");
		langmap.put("Valencian", "ca");
		langmap.put("Caddo", "cad");
		langmap.put("Central American Indian languages", "cai");
		langmap.put("Galibi Carib", "car");
		langmap.put("Caucasian languages", "cau");
		langmap.put("Chechen", "ce");
		langmap.put("Cebuano", "ceb");
		langmap.put("Celtic languages", "cel");
		langmap.put("Chamorro", "ch");
		langmap.put("Chibcha", "chb");
		langmap.put("Chagatai", "chg");
		langmap.put("Chuukese", "chk");
		langmap.put("Mari", "chm");
		langmap.put("Chinook jargon", "chn");
		langmap.put("Choctaw", "cho");
		langmap.put("Chipewyan", "chp");
		langmap.put("Dene Suline", "chp");
		langmap.put("Cherokee", "chr");
		langmap.put("Cheyenne", "chy");
		langmap.put("Chamic languages", "cmc");
		langmap.put("Corsican", "co");
		langmap.put("Coptic", "cop");
		langmap.put("Creoles and pidgins, English based", "cpe");
		langmap.put("Creoles and pidgins, French-based", "cpf");
		langmap.put("Creoles and pidgins, Portuguese-based", "cpp");
		langmap.put("Cree", "cr");
		langmap.put("Crimean Tatar", "crh");
		langmap.put("Crimean Turkish", "crh");
		langmap.put("Creoles and pidgins", "crp");
		langmap.put("Czech", "cs");
		langmap.put("Kashubian", "csb");
		langmap.put("Church Slavic", "cu");
		langmap.put("Old Slavonic", "cu");
		langmap.put("Church Slavonic", "cu");
		langmap.put("Old Bulgarian", "cu");
		langmap.put("Old Church Slavonic", "cu");
		langmap.put("Cushitic languages", "cus");
		langmap.put("Chuvash", "cv");
		langmap.put("Welsh", "cy");
		langmap.put("Danish", "da");
		langmap.put("Dakota", "dak");
		langmap.put("Dargwa", "dar");
		langmap.put("Land Dayak languages", "day");
		langmap.put("German", "de");
		langmap.put("Delaware", "del");
		langmap.put("Slave (Athapascan)", "den");
		langmap.put("Dogrib", "dgr");
		langmap.put("Dinka", "din");
		langmap.put("Dogri", "doi");
		langmap.put("Dravidian languages", "dra");
		langmap.put("Lower Sorbian", "dsb");
		langmap.put("Duala", "dua");
		langmap.put("Dutch, Middle (ca.1050-1350)", "dum");
		langmap.put("Divehi", "dv");
		langmap.put("Dhivehi", "dv");
		langmap.put("Maldivian", "dv");
		langmap.put("Dyula", "dyu");
		langmap.put("Dzongkha", "dz");
		langmap.put("Ewe", "ee");
		langmap.put("Efik", "efi");
		langmap.put("Egyptian (Ancient)", "egy");
		langmap.put("Ekajuk", "eka");
		langmap.put("Greek, Modern (1453-)", "el");
		langmap.put("Elamite", "elx");
		langmap.put("English", "en");
		langmap.put("English, Middle (1100-1500)", "enm");
		langmap.put("Esperanto", "eo");
		langmap.put("Spanish", "es");
		langmap.put("Castilian", "es");
		langmap.put("Estonian", "et");
		langmap.put("Basque", "eu");
		langmap.put("Ewondo", "ewo");
		langmap.put("Persian", "fa");
		langmap.put("Fang", "fan");
		langmap.put("Fanti", "fat");
		langmap.put("Fulah", "ff");
		langmap.put("Finnish", "fi");
		langmap.put("Filipino", "fil");
		langmap.put("Pilipino", "fil");
		langmap.put("Finno-Ugrian languages", "fiu");
		langmap.put("Fijian", "fj");
		langmap.put("Faroese", "fo");
		langmap.put("Fon", "fon");
		langmap.put("French", "fr");
		langmap.put("French, Middle (ca.1400-1600)", "frm");
		langmap.put("French, Old (842-ca.1400)", "fro");
		langmap.put("Northern Frisian", "frr");
		langmap.put("Eastern Frisian", "frs");
		langmap.put("Friulian", "fur");
		langmap.put("Western Frisian", "fy");
		langmap.put("Irish", "ga");
		langmap.put("Ga", "gaa");
		langmap.put("Gayo", "gay");
		langmap.put("Gbaya", "gba");
		langmap.put("Gaelic", "gd");
		langmap.put("Scottish Gaelic", "gd");
		langmap.put("Germanic languages", "gem");
		langmap.put("Geez", "gez");
		langmap.put("Gilbertese", "gil");
		langmap.put("Galician", "gl");
		langmap.put("German, Middle High (ca.1050-1500)", "gmh");
		langmap.put("Guarani", "gn");
		langmap.put("German, Old High (ca.750-1050)", "goh");
		langmap.put("Gondi", "gon");
		langmap.put("Gorontalo", "gor");
		langmap.put("Gothic", "got");
		langmap.put("Grebo", "grb");
		langmap.put("Greek, Ancient (to 1453)", "grc");
		langmap.put("Swiss German", "gsw");
		langmap.put("Alemannic", "gsw");
		langmap.put("Alsatian", "gsw");
		langmap.put("Gujarati", "gu");
		langmap.put("Manx", "gv");
		langmap.put("Gwich'in", "gwi");
		langmap.put("Hausa", "ha");
		langmap.put("Haida", "hai");
		langmap.put("Hawaiian", "haw");
		langmap.put("Hebrew", "he");
		langmap.put("Hindi", "hi");
		langmap.put("Hiligaynon", "hil");
		langmap.put("Himachali languages", "him");
		langmap.put("Western Pahari languages", "him");
		langmap.put("Hittite", "hit");
		langmap.put("Hmong", "hmn");
		langmap.put("Mong", "hmn");
		langmap.put("Hiri Motu", "ho");
		langmap.put("Croatian", "hr");
		langmap.put("Upper Sorbian", "hsb");
		langmap.put("Haitian", "ht");
		langmap.put("Haitian Creole", "ht");
		langmap.put("Hungarian", "hu");
		langmap.put("Hupa", "hup");
		langmap.put("Armenian", "hy");
		langmap.put("Herero", "hz");
		langmap.put("Iban", "iba");
		langmap.put("Indonesian", "id");
		langmap.put("Interlingue", "ie");
		langmap.put("Occidental", "ie");
		langmap.put("Igbo", "ig");
		langmap.put("Sichuan Yi", "ii");
		langmap.put("Nuosu", "ii");
		langmap.put("Ijo languages", "ijo");
		langmap.put("Inupiaq", "ik");
		langmap.put("Iloko", "ilo");
		langmap.put("Indic languages", "inc");
		langmap.put("Indo-European languages", "ine");
		langmap.put("Ingush", "inh");
		langmap.put("Ido", "io");
		langmap.put("Iranian languages", "ira");
		langmap.put("Iroquoian languages", "iro");
		langmap.put("Icelandic", "is");
		langmap.put("Italian", "it");
		langmap.put("Inuktitut", "iu");
		langmap.put("Japanese", "ja");
		langmap.put("Lojban", "jbo");
		langmap.put("Judeo-Persian", "jpr");
		langmap.put("Judeo-Arabic", "jrb");
		langmap.put("Javanese", "jv");
		langmap.put("Georgian", "ka");
		langmap.put("Kara-Kalpak", "kaa");
		langmap.put("Kabyle", "kab");
		langmap.put("Kachin", "kac");
		langmap.put("Jingpho", "kac");
		langmap.put("Kamba", "kam");
		langmap.put("Karen languages", "kar");
		langmap.put("Kawi", "kaw");
		langmap.put("Kabardian", "kbd");
		langmap.put("Kongo", "kg");
		langmap.put("Khasi", "kha");
		langmap.put("Khoisan languages", "khi");
		langmap.put("Khotanese", "kho");
		langmap.put("Sakan", "kho");
		langmap.put("Kikuyu", "ki");
		langmap.put("Gikuyu", "ki");
		langmap.put("Kuanyama", "kj");
		langmap.put("Kwanyama", "kj");
		langmap.put("Kazakh", "kk");
		langmap.put("Kalaallisut", "kl");
		langmap.put("Greenlandic", "kl");
		langmap.put("Central Khmer", "km");
		langmap.put("Kimbundu", "kmb");
		langmap.put("Kannada", "kn");
		langmap.put("Korean", "ko");
		langmap.put("Konkani", "kok");
		langmap.put("Kosraean", "kos");
		langmap.put("Kpelle", "kpe");
		langmap.put("Kanuri", "kr");
		langmap.put("Karachay-Balkar", "krc");
		langmap.put("Karelian", "krl");
		langmap.put("Kru languages", "kro");
		langmap.put("Kurukh", "kru");
		langmap.put("Kashmiri", "ks");
		langmap.put("Kurdish", "ku");
		langmap.put("Kumyk", "kum");
		langmap.put("Kutenai", "kut");
		langmap.put("Komi", "kv");
		langmap.put("Cornish", "kw");
		langmap.put("Kirghiz", "ky");
		langmap.put("Kyrgyz", "ky");
		langmap.put("Latin", "la");
		langmap.put("Ladino", "lad");
		langmap.put("Lahnda", "lah");
		langmap.put("Lamba", "lam");
		langmap.put("Luxembourgish", "lb");
		langmap.put("Letzeburgesch", "lb");
		langmap.put("Lezghian", "lez");
		langmap.put("Ganda", "lg");
		langmap.put("Limburgan", "li");
		langmap.put("Limburger", "li");
		langmap.put("Limburgish", "li");
		langmap.put("Lingala", "ln");
		langmap.put("Lao", "lo");
		langmap.put("Mongo", "lol");
		langmap.put("Lozi", "loz");
		langmap.put("Lithuanian", "lt");
		langmap.put("Luba-Katanga", "lu");
		langmap.put("Luba-Lulua", "lua");
		langmap.put("Luiseno", "lui");
		langmap.put("Lunda", "lun");
		langmap.put("Luo (Kenya and Tanzania)", "luo");
		langmap.put("Lushai", "lus");
		langmap.put("Latvian", "lv");
		langmap.put("Madurese", "mad");
		langmap.put("Magahi", "mag");
		langmap.put("Maithili", "mai");
		langmap.put("Makasar", "mak");
		langmap.put("Mandingo", "man");
		langmap.put("Austronesian languages", "map");
		langmap.put("Masai", "mas");
		langmap.put("Moksha", "mdf");
		langmap.put("Mandar", "mdr");
		langmap.put("Mende", "men");
		langmap.put("Malagasy", "mg");
		langmap.put("Irish, Middle (900-1200)", "mga");
		langmap.put("Marshallese", "mh");
		langmap.put("Maori", "mi");
		langmap.put("Mi'kmaq", "mic");
		langmap.put("Micmac", "mic");
		langmap.put("Minangkabau", "min");
		langmap.put("Uncoded languages", "mis");
		langmap.put("Macedonian", "mk");
		langmap.put("Mon-Khmer languages", "mkh");
		langmap.put("Malayalam", "ml");
		langmap.put("Mongolian", "mn");
		langmap.put("Manchu", "mnc");
		langmap.put("Manipuri", "mni");
		langmap.put("Manobo languages", "mno");
		langmap.put("Mohawk", "moh");
		langmap.put("Mossi", "mos");
		langmap.put("Marathi", "mr");
		langmap.put("Malay", "ms");
		langmap.put("Maltese", "mt");
		langmap.put("Multiple languages", "mul");
		langmap.put("Munda languages", "mun");
		langmap.put("Creek", "mus");
		langmap.put("Mirandese", "mwl");
		langmap.put("Marwari", "mwr");
		langmap.put("Burmese", "my");
		langmap.put("Mayan languages", "myn");
		langmap.put("Erzya", "myv");
		langmap.put("Nauru", "na");
		langmap.put("Nahuatl languages", "nah");
		langmap.put("North American Indian languages", "nai");
		langmap.put("Neapolitan", "nap");
		langmap.put("BokmÃ¥l, Norwegian", "nb");
		langmap.put("Norwegian BokmÃ¥l", "nb");
		langmap.put("Ndebele, North", "nd");
		langmap.put("North Ndebele", "nd");
		langmap.put("Low German", "nds");
		langmap.put("Low Saxon", "nds");
		langmap.put("German, Low", "nds");
		langmap.put("Saxon, Low", "nds");
		langmap.put("Nepali", "ne");
		langmap.put("Nepal Bhasa", "new");
		langmap.put("Newari", "new");
		langmap.put("Ndonga", "ng");
		langmap.put("Nias", "nia");
		langmap.put("Niger-Kordofanian languages", "nic");
		langmap.put("Niuean", "niu");
		langmap.put("Dutch", "nl");
		langmap.put("Flemish", "nl");
		langmap.put("Norwegian Nynorsk", "nn");
		langmap.put("Nynorsk, Norwegian", "nn");
		langmap.put("Norwegian", "no");
		langmap.put("Nogai", "nog");
		langmap.put("Norse, Old", "non");
		langmap.put("N'Ko", "nqo");
		langmap.put("Ndebele, South", "nr");
		langmap.put("South Ndebele", "nr");
		langmap.put("Pedi", "nso");
		langmap.put("Sepedi", "nso");
		langmap.put("Northern Sotho", "nso");
		langmap.put("Nubian languages", "nub");
		langmap.put("Navajo", "nv");
		langmap.put("Navaho", "nv");
		langmap.put("Classical Newari", "nwc");
		langmap.put("Old Newari", "nwc");
		langmap.put("Classical Nepal Bhasa", "nwc");
		langmap.put("Chichewa", "ny");
		langmap.put("Chewa", "ny");
		langmap.put("Nyanja", "ny");
		langmap.put("Nyamwezi", "nym");
		langmap.put("Nyankole", "nyn");
		langmap.put("Nyoro", "nyo");
		langmap.put("Nzima", "nzi");
		langmap.put("Occitan (post 1500)", "oc");
		langmap.put("Ojibwa", "oj");
		langmap.put("Oromo", "om");
		langmap.put("Oriya", "or");
		langmap.put("Ossetian", "os");
		langmap.put("Ossetic", "os");
		langmap.put("Osage", "osa");
		langmap.put("Turkish, Ottoman (1500-1928)", "ota");
		langmap.put("Otomian languages", "oto");
		langmap.put("Panjabi", "pa");
		langmap.put("Punjabi", "pa");
		langmap.put("Papuan languages", "paa");
		langmap.put("Pangasinan", "pag");
		langmap.put("Pahlavi", "pal");
		langmap.put("Pampanga", "pam");
		langmap.put("Kapampangan", "pam");
		langmap.put("Papiamento", "pap");
		langmap.put("Palauan", "pau");
		langmap.put("Persian, Old (ca.600-400 B.C.)", "peo");
		langmap.put("Philippine languages", "phi");
		langmap.put("Phoenician", "phn");
		langmap.put("Pali", "pi");
		langmap.put("Polish", "pl");
		langmap.put("Pohnpeian", "pon");
		langmap.put("Prakrit languages", "pra");
		langmap.put("ProvenÃ§al, Old (to 1500)", "pro");
		langmap.put("Occitan, Old (to 1500)", "pro");
		langmap.put("Pushto", "ps");
		langmap.put("Pashto", "ps");
		langmap.put("Portuguese", "pt");
		langmap.put("Reserved for local use", "qaa-qtz");
		langmap.put("Quechua", "qu");
		langmap.put("Rajasthani", "raj");
		langmap.put("Rapanui", "rap");
		langmap.put("Rarotongan", "rar");
		langmap.put("Cook Islands Maori", "rar");
		langmap.put("Romansh", "rm");
		langmap.put("Rundi", "rn");
		langmap.put("Romanian", "ro");
		langmap.put("Moldavian", "ro");
		langmap.put("Moldovan", "ro");
		langmap.put("Romance languages", "roa");
		langmap.put("Romany", "rom");
		langmap.put("Russian", "ru");
		langmap.put("Aromanian", "rup");
		langmap.put("Arumanian", "rup");
		langmap.put("Macedo-Romanian", "rup");
		langmap.put("Kinyarwanda", "rw");
		langmap.put("Sanskrit", "sa");
		langmap.put("Sandawe", "sad");
		langmap.put("Yakut", "sah");
		langmap.put("South American Indian languages", "sai");
		langmap.put("Salishan languages", "sal");
		langmap.put("Samaritan Aramaic", "sam");
		langmap.put("Sasak", "sas");
		langmap.put("Santali", "sat");
		langmap.put("Sardinian", "sc");
		langmap.put("Sicilian", "scn");
		langmap.put("Scots", "sco");
		langmap.put("Sindhi", "sd");
		langmap.put("Northern Sami", "se");
		langmap.put("Selkup", "sel");
		langmap.put("Semitic languages", "sem");
		langmap.put("Sango", "sg");
		langmap.put("Irish, Old (to 900)", "sga");
		langmap.put("Sign Languages", "sgn");
		langmap.put("Shan", "shn");
		langmap.put("Sinhala", "si");
		langmap.put("Sinhalese", "si");
		langmap.put("Sidamo", "sid");
		langmap.put("Siouan languages", "sio");
		langmap.put("Sino-Tibetan languages", "sit");
		langmap.put("Slovak", "sk");
		langmap.put("Slovenian", "sl");
		langmap.put("Slavic languages", "sla");
		langmap.put("Samoan", "sm");
		langmap.put("Southern Sami", "sma");
		langmap.put("Sami languages", "smi");
		langmap.put("Lule Sami", "smj");
		langmap.put("Inari Sami", "smn");
		langmap.put("Skolt Sami", "sms");
		langmap.put("Shona", "sn");
		langmap.put("Soninke", "snk");
		langmap.put("Somali", "so");
		langmap.put("Sogdian", "sog");
		langmap.put("Songhai languages", "son");
		langmap.put("Albanian", "sq");
		langmap.put("Serbian", "sr");
		langmap.put("Sranan Tongo", "srn");
		langmap.put("Serer", "srr");
		langmap.put("Swati", "ss");
		langmap.put("Nilo-Saharan languages", "ssa");
		langmap.put("Sotho, Southern", "st");
		langmap.put("Sundanese", "su");
		langmap.put("Sukuma", "suk");
		langmap.put("Susu", "sus");
		langmap.put("Sumerian", "sux");
		langmap.put("Swedish", "sv");
		langmap.put("Swahili", "sw");
		langmap.put("Classical Syriac", "syc");
		langmap.put("Syriac", "syr");
		langmap.put("Tamil", "ta");
		langmap.put("Tai languages", "tai");
		langmap.put("Telugu", "te");
		langmap.put("Timne", "tem");
		langmap.put("Tereno", "ter");
		langmap.put("Tetum", "tet");
		langmap.put("Tajik", "tg");
		langmap.put("Thai", "th");
		langmap.put("Tigrinya", "ti");
		langmap.put("Tigre", "tig");
		langmap.put("Tiv", "tiv");
		langmap.put("Turkmen", "tk");
		langmap.put("Tokelau", "tkl");
		langmap.put("Tagalog", "tl");
		langmap.put("Klingon", "tlh");
		langmap.put("tlhIngan-Hol", "tlh");
		langmap.put("Tlingit", "tli");
		langmap.put("Tamashek", "tmh");
		langmap.put("Tswana", "tn");
		langmap.put("Tonga (Tonga Islands)", "to");
		langmap.put("Tonga (Nyasa)", "tog");
		langmap.put("Tok Pisin", "tpi");
		langmap.put("Turkish", "tr");
		langmap.put("Tsonga", "ts");
		langmap.put("Tsimshian", "tsi");
		langmap.put("Tatar", "tt");
		langmap.put("Tumbuka", "tum");
		langmap.put("Tupi languages", "tup");
		langmap.put("Altaic languages", "tut");
		langmap.put("Tuvalu", "tvl");
		langmap.put("Twi", "tw");
		langmap.put("Tahitian", "ty");
		langmap.put("Tuvinian", "tyv");
		langmap.put("Udmurt", "udm");
		langmap.put("Uighur", "ug");
		langmap.put("Uyghur", "ug");
		langmap.put("Ugaritic", "uga");
		langmap.put("Ukrainian", "uk");
		langmap.put("Umbundu", "umb");
		langmap.put("Undetermined", "und");
		langmap.put("Urdu", "ur");
		langmap.put("Uzbek", "uz");
		langmap.put("Vai", "vai");
		langmap.put("Venda", "ve");
		langmap.put("Vietnamese", "vi");
		langmap.put("VolapÃ¼k", "vo");
		langmap.put("Votic", "vot");
		langmap.put("Walloon", "wa");
		langmap.put("Wakashan languages", "wak");
		langmap.put("Wolaitta", "wal");
		langmap.put("Wolaytta", "wal");
		langmap.put("Waray", "war");
		langmap.put("Washo", "was");
		langmap.put("Sorbian languages", "wen");
		langmap.put("Wolof", "wo");
		langmap.put("Kalmyk", "xal");
		langmap.put("Oirat", "xal");
		langmap.put("Xhosa", "xh");
		langmap.put("Yao", "yao");
		langmap.put("Yapese", "yap");
		langmap.put("Yiddish", "yi");
		langmap.put("Yoruba", "yo");
		langmap.put("Yupik languages", "ypk");
		langmap.put("Zhuang", "za");
		langmap.put("Chuang", "za");
		langmap.put("Zapotec", "zap");
		langmap.put("Blissymbols", "zbl");
		langmap.put("Blissymbolics", "zbl");
		langmap.put("Bliss", "zbl");
		langmap.put("Zenaga", "zen");
		langmap.put("Standard Moroccan Tamazight", "zgh");
		langmap.put("Chinese", "zh");
		langmap.put("Zande languages", "znd");
		langmap.put("Zulu", "zu");
		langmap.put("Zuni", "zun");
		langmap.put("Zaza", "zza");
		langmap.put("Dimili", "zza");
		langmap.put("Dimli", "zza");
		langmap.put("Kirdki", "zza");
		langmap.put("Kirmanjki", "zza");
		langmap.put("Zazaki", "zza");

		langConstants.put("canada", Locale.CANADA);
		langConstants.put("canada_french", Locale.CANADA_FRENCH);
		langConstants.put("china", Locale.CHINA);
		langConstants.put("chinese", Locale.CHINESE);
		langConstants.put("english", Locale.ENGLISH);
		langConstants.put("france", Locale.FRANCE);
		langConstants.put("french", Locale.FRENCH);
		langConstants.put("german", Locale.GERMAN);
		langConstants.put("germany", Locale.GERMANY);
		langConstants.put("italian", Locale.ITALIAN);
		langConstants.put("italy", Locale.ITALY);
		langConstants.put("japan", Locale.JAPAN);
		langConstants.put("japanese", Locale.JAPANESE);
		langConstants.put("korea", Locale.KOREA);
		langConstants.put("korean", Locale.KOREAN);
		langConstants.put("simplified_chinese", Locale.SIMPLIFIED_CHINESE);
		langConstants.put("taiwan", Locale.TAIWAN);
		langConstants.put("traditional_chinese", Locale.TRADITIONAL_CHINESE);
		langConstants.put("uk", Locale.UK);
		langConstants.put("us", Locale.US);
	}

	public static Locale getLocale(String lang) {
		if (langmap.containsKey(lang)) {
			return new Locale(langmap.get(lang));
		} else if (langConstants.containsKey(lang)) {
			return langConstants.get(lang);
		} else {
			return Locale.getDefault();
		}
	}


}
